package com.tdkj.model.enterprisezone;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;
import com.tdkj.model.user.BeanUser;

@Entity
@Table(name = "ezone_visitor")
public class BeanEnterpriseZoneVisitor extends BaseEntity{
	
	private BeanUser user;
	private Timestamp visitTime;
	private BeanEnterpriseZone enterpriseZone; 
	
	@ManyToOne(cascade={CascadeType.REFRESH}, fetch = FetchType.EAGER )
	public BeanUser getUser() {
		return user;
	}
	public void setUser(BeanUser user) {
		this.user = user;
	}
	
	public Timestamp getVisitTime() {
		return visitTime;
	}
	public void setVisitTime(Timestamp visitTime) {
		this.visitTime = visitTime;
	}
	
	@ManyToOne(cascade={CascadeType.ALL}, fetch = FetchType.EAGER )
	@JoinColumn(name="enterpriseZone_id")
	public BeanEnterpriseZone getEnterpriseZone() {
		return enterpriseZone;
	}
	public void setEnterpriseZone(BeanEnterpriseZone enterpriseZone) {
		this.enterpriseZone = enterpriseZone;
	}
	
}